Apply some arbitrary lower limit for the guessed wrap width. (#332466,
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Mar 2006 04:55:53 +0000 (04:55 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 6 Mar 2006 04:55:53 +0000 (04:55 +0000)
2006-03-05  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkiconview.c (adjust_wrap_width): Apply some
arbitrary lower limit for the guessed wrap width. (#332466,
Donald Straney)

ChangeLog
ChangeLog.pre-2-10
gtk/gtkiconview.c

index 2501733db8f0ee65f1c776129d2d10e97a3fbd0b..d548edd7d59eeae53f2d8e134a7f984c3a35bb7c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2006-03-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkiconview.c (adjust_wrap_width): Apply some
+       arbitrary lower limit for the guessed wrap width. (#332466,
+       Donald Straney)
+
+2006-03-05  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix handling of image-only buttons.  (#332985, Kalle 
+       Vahlmann, #333555)
+       
+       * gtk/gtkbutton.c (gtk_button_construct_child): Don't
+       return early if there an image to show.
+       (show_image): Always return TRUE if there is no text.
+
 2006-03-04  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates):
index 2501733db8f0ee65f1c776129d2d10e97a3fbd0b..d548edd7d59eeae53f2d8e134a7f984c3a35bb7c 100644 (file)
@@ -1,3 +1,18 @@
+2006-03-05  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkiconview.c (adjust_wrap_width): Apply some
+       arbitrary lower limit for the guessed wrap width. (#332466,
+       Donald Straney)
+
+2006-03-05  Matthias Clasen  <mclasen@redhat.com>
+
+       Fix handling of image-only buttons.  (#332985, Kalle 
+       Vahlmann, #333555)
+       
+       * gtk/gtkbutton.c (gtk_button_construct_child): Don't
+       return early if there an image to show.
+       (show_image): Always return TRUE if there is no text.
+
 2006-03-04  Matthias Clasen  <mclasen@redhat.com>
 
        * gdk/x11/gdkinput-x11 (gdk_input_translate_coordinates):
index 5de9f61102acfdf1cd6da7db95e63702ee182490..b33395c7a930673152042f113b75cb8bb92d6e3d 100644 (file)
@@ -2607,7 +2607,7 @@ adjust_wrap_width (GtkIconView     *icon_view,
                                  NULL);
          
       if (item->width == -1)
-       wrap_width = pixbuf_width;
+       wrap_width = MAX (2 * pixbuf_width, 50);
       else if (icon_view->priv->orientation == GTK_ORIENTATION_VERTICAL)
        wrap_width = item->width;
       else
@@ -2657,7 +2657,7 @@ gtk_icon_view_calculate_item_size (GtkIconView     *icon_view,
                                  NULL, NULL, NULL,
                                  &item->box[info->position].width, 
                                  &item->box[info->position].height);
-      
+
       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
        {
          item->width += item->box[info->position].width 
@@ -2710,45 +2710,45 @@ gtk_icon_view_calculate_item_size2 (GtkIconView     *icon_view,
          continue;
 
        if (!info->cell->visible)
-        continue;
-
-      if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-       {
-         cell_area.width = item->box[info->position].width;
-         cell_area.height = item->height;
-       }
-      else
-       {
-         cell_area.width = item->width;
-         cell_area.height = max_height[i];
-       }
-
-      gtk_cell_renderer_get_size (info->cell, GTK_WIDGET (icon_view), 
-                                 &cell_area,
-                                 &item->box[info->position].x, &item->box[info->position].y,
-                                 &item->box[info->position].width, &item->box[info->position].height);
-
-      item->box[info->position].x += cell_area.x;
-      item->box[info->position].y += cell_area.y;
-      if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
-       {
-         item->before[info->position] = item->box[info->position].x - cell_area.x;
-         item->after[info->position] = cell_area.width - item->box[info->position].width - item->before[info->position];
-         cell_area.x += cell_area.width + spacing;
-       }
-      else
-       {
-         if (item->box[info->position].width > item->width)
-           {
-             item->width = item->box[info->position].width;
-             cell_area.width = item->width;
-           }
-         item->before[info->position] = item->box[info->position].y - cell_area.y;
-         item->after[info->position] = cell_area.height - item->box[info->position].height - item->before[info->position];
-         cell_area.y += cell_area.height + spacing;
-       }
-    }
+         continue;
 
+       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+         {
+           cell_area.width = item->box[info->position].width;
+           cell_area.height = item->height;
+         }
+       else
+         {
+           cell_area.width = item->width;
+           cell_area.height = max_height[i];
+         }
+       
+       gtk_cell_renderer_get_size (info->cell, GTK_WIDGET (icon_view), 
+                                   &cell_area,
+                                   &item->box[info->position].x, &item->box[info->position].y,
+                                   &item->box[info->position].width, &item->box[info->position].height);
+       
+       item->box[info->position].x += cell_area.x;
+       item->box[info->position].y += cell_area.y;
+       if (icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+         {
+           item->before[info->position] = item->box[info->position].x - cell_area.x;
+           item->after[info->position] = cell_area.width - item->box[info->position].width - item->before[info->position];
+           cell_area.x += cell_area.width + spacing;
+         }
+       else
+         {
+           if (item->box[info->position].width > item->width)
+             {
+               item->width = item->box[info->position].width;
+               cell_area.width = item->width;
+             }
+           item->before[info->position] = item->box[info->position].y - cell_area.y;
+           item->after[info->position] = cell_area.height - item->box[info->position].height - item->before[info->position];
+           cell_area.y += cell_area.height + spacing;
+         }
+      }
+  
   if (rtl && icon_view->priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     {
       for (i = 0; i < icon_view->priv->n_cells; i++)